import { IsIn, IsNotEmpty, IsOptional, IsString } from 'class-validator'

export class AddFriendDto {
  @IsString()
  @IsNotEmpty()
  friendId: string

  @IsString()
  @IsOptional()
  group?: string
}

export class HandleFriendRequestDto {
  @IsString()
  @IsNotEmpty()
  friendId: string

  @IsIn(['accept', 'reject', 'block'])
  action: 'accept' | 'reject' | 'block'
}

export class UpdateFriendGroupDto {
  @IsString()
  @IsNotEmpty()
  friendId: string

  @IsString()
  @IsOptional()
  group?: string
}

export class DeleteFriendDto {
  @IsString()
  @IsNotEmpty()
  friendId: string
}

export class FriendResponseDto {
  id: string
  userId: string
  friendId: string
  group?: string
  status: string
  createdAt: Date
  updatedAt: Date
  friendInfo: {
    nickname: string
    avatar?: string
    onlineStatus: boolean
  }
}
